﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DigitalRune.Windows.TextEditor;

namespace Zove.Desktop.Tools
{
    public partial class FindView : Form
    {
        public FindView()
        {
            InitializeComponent();
        }

        private void btnFindNext_Click(object sender, EventArgs e) {
            if (DesktopFormContext.Context.Main.ActiveMdiChild is IDesktopView) {
                IDesktopView form = DesktopFormContext.Context.Main.ActiveMdiChild as IDesktopView;
                TextEditorControl tec = form.GetTextEditorControl();
                tec.ActiveTextAreaControl.TextArea.SelectionManager.SetSelection(
                    new DigitalRune.Windows.TextEditor.Document.TextLocation(),
                    new DigitalRune.Windows.TextEditor.Document.TextLocation());
            }
        }
    }
}
